﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="扎帐日设置.aspx.cs" Inherits="syc.Sale.扎帐日设置" %>

<head runat="server">
    <title></title>
</head>
<body>
   <script type="text/javascript" language="javascript" src="/common.js"></script>

    <form id="form1" runat="server">
    <div id="wintop" class="wintop">供应处扎帐日设置</div>

    <asp:Panel ID="Panel1" runat="server" CssClass="panel">
        <span style="display:inline-block;width:250px;text-align:right;padding-right:16px;">
            年 度：<asp:DropDownList ID="NianFen" runat="server" Width="120px" 
            onselectedindexchanged="NianFen_SelectedIndexChanged" AutoPostBack="true">
                <asp:ListItem>2008</asp:ListItem>
                <asp:ListItem>2009</asp:ListItem>
                <asp:ListItem>2010</asp:ListItem>
                <asp:ListItem>2011</asp:ListItem>
            </asp:DropDownList>
        </span>
        <span style="display:inline-block;width:195px;text-align:right;">
            &nbsp;&nbsp; 月 份：<asp:DropDownList ID="YueFen" runat="server" Width="80px" 
            onselectedindexchanged="YueFen_SelectedIndexChanged" AutoPostBack="true">
                <asp:ListItem>1</asp:ListItem>
                <asp:ListItem>2</asp:ListItem>
                <asp:ListItem>3</asp:ListItem>
                <asp:ListItem>4</asp:ListItem>
                <asp:ListItem>5</asp:ListItem>
                <asp:ListItem>6</asp:ListItem>
                <asp:ListItem>7</asp:ListItem>
                <asp:ListItem>8</asp:ListItem>
                <asp:ListItem>9</asp:ListItem>
                <asp:ListItem>10</asp:ListItem>
                <asp:ListItem>11</asp:ListItem>
                <asp:ListItem>12</asp:ListItem>
            </asp:DropDownList> 
        </span>
        <br />
        <span style="display:inline-block;width:250px;text-align:right;">
            月初日期：<asp:TextBox ID="Date1" runat="server" CssClass="intxt1" Width="120px"></asp:TextBox><img alt="" src="/Icons/29.png" align="middle" onclick="makecalendar(document.getElementById('Date1').value, document.getElementById('Date1'));" />
        </span>
        <span style="display:inline-block;width:250px;text-align:right;">
            上旬截止日期：<asp:TextBox ID="Date2" runat="server" CssClass="intxt1" Width="120px"></asp:TextBox><img alt="" src="/Icons/29.png" align="middle" onclick="makecalendar(document.getElementById('Date2').value, document.getElementById('Date2'));" />
        </span>
        <br />
        <span style="display:inline-block;width:250px;text-align:right;">
            中旬截止日期：<asp:TextBox ID="Date3" runat="server" CssClass="intxt1" 
            Width="120px" Height="22px"></asp:TextBox><img alt="" src="/Icons/29.png" align="middle" onclick="makecalendar(document.getElementById('Date3').value, document.getElementById('Date3'));" />
        </span>
        <span style="display:inline-block;width:250px;text-align:right;">
            月末日期：<asp:TextBox ID="Date4" runat="server" CssClass="intxt1" Width="120px"></asp:TextBox><img alt="" src="/Icons/29.png" align="middle" onclick="makecalendar(document.getElementById('Date4').value, document.getElementById('Date4'));" />
        </span>
        <span style="display:inline-block;width:160px;text-align:right;">
        <asp:Button ID="Button_Save" runat="server" Text="设 置" CssClass="wsbutton" 
            UseSubmitBehavior="False" onclick="Button_Save_Click"  />
        </span>

    </asp:Panel>
    
    <asp:Panel ID="Panel2" runat="server" CssClass="panel2">
        <asp:Label ID="Message" runat="server" Text="·准备就绪" CssClass="prompt"></asp:Label>
    </asp:Panel>
        
    <div class="gridframe">
        <div class="gridview">
        
            <table border="1" width="100%" cellspacing="0" cellpadding="0" bordercolor="#e5cfab">
	            <tr>
		            <td class="grid-title">供应处扎帐日设置</td>
		        </tr>
		        <tr>
		            <td class="grid-back">
                        <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
                            ConnectionString="<%$ ConnectionStrings:SCMConnectionString1 %>" 
                            onselected="SqlDataSource1_Selected" ></asp:SqlDataSource>
                        <asp:GridView ID="GridView1" runat="server" AllowPaging="True" 
                            AutoGenerateColumns="False" CssClass="grid" DataKeyNames="年度,月份" 
                            DataSourceID="SqlDataSource1" PageSize="20"
                            GridLines="None" ondatabound="GridView1_DataBound" 
                            onpageindexchanged="GridView1_PageIndexChanged" AllowSorting="False" 
                            UseAccessibleHeader="False" >
                            <PagerSettings Visible="False" />
                            <RowStyle CssClass="tr.grid-row-fix" />
                            <Columns>                                             
                                <asp:TemplateField HeaderText="年度" SortExpression="年度">
                                    <ItemTemplate>
                                        <asp:Label ID="Label1" runat="server" Text='<%# Bind("年度") %>'></asp:Label>
                                    </ItemTemplate>
                                    <HeaderStyle CssClass="grid-header" />
                                    <ItemStyle CssClass="grid" HorizontalAlign="Center" Width="80px" />
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="月份" SortExpression="月份">
                                    <ItemTemplate>
                                        <asp:Label ID="Label2" runat="server" Text='<%# Bind("月份") %>'></asp:Label>
                                    </ItemTemplate>
                                    <HeaderStyle CssClass="grid-header" />
                                    <ItemStyle CssClass="grid" HorizontalAlign="Center" Width="80px" />
                                </asp:TemplateField>  
                                <asp:TemplateField HeaderText="月初日期" SortExpression="月初日期">
                                    <ItemTemplate>
                                        <asp:Label ID="Label3" runat="server" Text='<%# Bind("月初日期","{0:D}") %>'></asp:Label>
                                    </ItemTemplate>
                                    <HeaderStyle CssClass="grid-header" />
                                    <ItemStyle CssClass="grid" HorizontalAlign="Center" Width="120px" />
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="上旬截止日期" SortExpression="上旬日期">
                                    <ItemTemplate>
                                        <asp:Label ID="Label4" runat="server" Text='<%# Bind("上旬日期","{0:D}") %>'></asp:Label>
                                    </ItemTemplate>
                                    <HeaderStyle CssClass="grid-header" />
                                    <ItemStyle CssClass="grid" HorizontalAlign="Center" Width="120px" />
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="中旬截止日期" SortExpression="中旬日期">
                                    <ItemTemplate>
                                        <asp:Label ID="Label5" runat="server" Text='<%# Bind("中旬日期","{0:D}") %>'></asp:Label>
                                    </ItemTemplate>
                                    <HeaderStyle CssClass="grid-header" />
                                    <ItemStyle CssClass="grid" HorizontalAlign="Center" Width="120px" />
                                </asp:TemplateField>
                                
                                <asp:TemplateField HeaderText="月末日期" SortExpression="月末日期">
                                    <ItemTemplate>
                                        <asp:Label ID="Label6" runat="server" Text='<%# Bind("月末日期","{0:D}") %>'></asp:Label>
                                    </ItemTemplate>
                                    <HeaderStyle CssClass="grid-header" />
                                    <ItemStyle CssClass="grid" HorizontalAlign="Center" Width="120px" />
                                </asp:TemplateField>

                            </Columns>
                          </asp:GridView>
		            </td>
	            </tr>
	            <tr>
		            <td>   
		                <table width="100%">
		                    <tr>
		                        <td class="pagebar">
                                    <asp:Button ID="Button_Pager_First" runat="server" Text="" ToolTip="首页" 
                                        CssClass="pageturn-first-b" onclick="Pager_Click" CommandName="--" />
                                    <asp:Button ID="Button_Pager_Prev" runat="server" Text="" ToolTip="上一页" 
                                        CssClass="pageturn-prev-b" onclick="Pager_Click" CommandName="-" />
                                    <input type="button" class="page-split" />第<asp:TextBox ID="TextBox_Pager" runat="server" CssClass="pageturn" 
                                        ontextchanged="Pager_Click"></asp:TextBox>页<input type="button" class="page-split" /><asp:Label ID="Label_Pages" runat="server"></asp:Label><input type="button" class="page-split" />
                                    
                                    <asp:Button ID="Button_Pager_Next" runat="server" Text="" ToolTip="下一页" 
                                        CssClass="pageturn-next-b" onclick="Pager_Click" CommandName="+" />
                                    <asp:Button ID="Button_Pager_Last" runat="server" Text="" ToolTip="末页" 
                                        CssClass="pageturn-last-b" onclick="Pager_Click" CommandName="++" />
                                </td>
                                <td class="pagebar" align="right">
                                    <asp:Label ID="Label_Total" runat="server"></asp:Label>
                                </td>
                            </tr>
                       </table>

		            </td>
	            </tr>
            </table>
            

        </div>
    </div>
    
    </form>
<script>
    var textboxs = document.getElementsByTagName("input");
    var i;
    for (i = 0; i < textboxs.length; i++) {
        if (textboxs[i].className == "textbox") {
            textboxs[i].onchange = function(e) { this.className = "textbox-changed"; };
            textboxs[i].onfocus = function(e) { this.select(); };
        }
        else if (textboxs[i].className == "pageturn" || textboxs[i].className == "intxt1" || textboxs[i].className == "intxt2") {
            textboxs[i].onfocus = function(e) { this.select(); };
        }

    }
    document.getElementById("Date1").readOnly = true;
    document.getElementById("Date2").readOnly = true;
</script>
</body>
</html>
